package org.sunrise.game.global.service.pvp;

import org.sunrise.game.rpc.annotation.RpcMethod;
import org.sunrise.game.rpc.annotation.RpcService;
import org.sunrise.game.rpc.service.BaseService;

import java.util.HashMap;
import java.util.Map;

@RpcService
public class PvpService extends BaseService {

    private Map<String, String> datas = new HashMap<>();

    public PvpService(String nodeId) {
        super(nodeId);
    }

    public void init() {
        super.init();
        // 假设加载出了数据
        datas.put("PvpService", "pvp n1");
    }

    @RpcMethod
    public void getData(String id) {
        returns("data", datas.get(id));
    }
}
